package com.demo.gateway.service;

import org.quartz.SchedulerException;

import com.demo.gateway.pojo.ScheduleJobDO;
import com.demo.gateway.quartz.ScheduleOptType;

/**
 * @author: demo
 * @date: 2020年7月3日
 * @Document :  定时接口
 */
public interface IScheduleJob {
    /**
     * 添加定时任务
     * @param job
     */
    public void addJob(ScheduleJobDO job);
    
    /**
     * 操作定时任务
     * @param jobOperateEnum
     * @param job
     * @throws SchedulerException
     */
    public void operateJob(ScheduleOptType   jobOperateEnum, ScheduleJobDO job) throws SchedulerException;
    
    /**
     * 开启所有定时
     * @throws SchedulerException
     */
    public void startAllJob() throws SchedulerException ;
    /**
     * 关闭所有定时
     * @throws SchedulerException
     */
    public void pauseAllJob() throws SchedulerException ;
    
    /**
     * 刷新job
     */
    public  void   refreshJobs();
}
